package com.tanjun.common.enums.queue;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.concurrent.TimeUnit;

@AllArgsConstructor
@Getter
public enum DelayQueueTypeEnum  {
    NORMAL_ORDER_PAY_CANCEL("normal_order_pay_cancel", 1, java.util.concurrent.TimeUnit.MINUTES), //普通订单超时支付自动取消
    NORMAL_ORDER_PAY_RESULT("normal_order_pay_result", 1, java.util.concurrent.TimeUnit.MINUTES), //普通订单超时支付结果查询
    ;

    private final String queueName;
    private final long delayTime;
    private final TimeUnit timeUnit;

    /**
     * 枚举数据库存储值
     */
    public String getValue() {
        return this.queueName;
    }
}
